<template>
  <div>
    <h1>点击下方按钮！</h1>
    <el-button type="primary" round @click="active">激活</el-button>
  </div>
</template>

<script>
  import { requestLogin } from '../api/api';
  //import NProgress from 'nprogress'
  export default {
    data() {
      return {
        pageInfo:{
          data: [],
          total: 0
        },
      };
    },
    methods: {
      active(){
        this.$http.post("/shop/activation",this.shop)
            .then(res => {
              res = res.data;
              if(res.success){
                this.pageInfo = res.data;
                console.log(this.pageInfo);
                this.listLoading = false;
              }
            })
            .catch(res => {});
        this.$http.get("/shop/activation")
            .then(res=>{
              if(res.data.success){
                this.$message({
                  message: '激活成功!',
                  type: 'success'
                });
              }else{
                this.$message({
                  message: '激活失败!',
                  type: 'error'
                });
              }
            })
      }
    }
  }

</script>

<style lang="scss" scoped>

</style>